package com.leyou.mapper;

import com.leyou.common.mapper.BaseMapper;
import com.leyou.domain.Role;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface RoleMapper extends BaseMapper<Role> {
    @Select("SELECT r.id,r.role_name roleName,r.role_desc roleDesc " +
            "FROM `tb_role` r ,`tb_user_role` ur " +
            "WHERE r.id = ur.rid AND ur.uid = #{uid} ")
    public List<Role> findByUid(Long uid);
}
